<template>
  <div>
    <!-- 顶部导航栏 -->
    <top-nav-bar />
    <!-- 主体部分 -->
    <el-main>
      <div class="content-container">
        <router-view></router-view>
      </div>
    </el-main>
  </div>
</template>

<script setup lang="ts">
import TopNavBar from '@/components/TopNavBar.vue'
import { useUserStore } from '@/store/user'
import { getUserInfo } from './api/user'

const store = useUserStore()

getUserInfo().then((res: any) => {
  store.setUserInfo(res)
})
</script>

<style scoped>
.content-container {
  width: 1000px;
  margin: 0 auto;
}
</style>
